package com.poker.monitor.model;

public class PokerCard {
    public enum Suit {
        SPADES,   // 黑桃
        HEARTS,   // 红心
        CLUBS,    // 梅花
        DIAMONDS  // 方块
    }

    private Suit suit;      // 花色
    private int number;     // 点数（1-13，1代表A，11-13代表JQK）
    private boolean isVisible;  // 是否可见

    public PokerCard(Suit suit, int number) {
        this.suit = suit;
        this.number = number;
        this.isVisible = false;
    }

    public Suit getSuit() {
        return suit;
    }

    public void setSuit(Suit suit) {
        this.suit = suit;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public boolean isVisible() {
        return isVisible;
    }

    public void setVisible(boolean visible) {
        isVisible = visible;
    }

    @Override
    public String toString() {
        String numberStr;
        switch (number) {
            case 1:
                numberStr = "A";
                break;
            case 11:
                numberStr = "J";
                break;
            case 12:
                numberStr = "Q";
                break;
            case 13:
                numberStr = "K";
                break;
            default:
                numberStr = String.valueOf(number);
        }
        return suit.name() + " " + numberStr;
    }
}